package com.kehutong.charge.vo;

import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.kehutong.common.util.BigDecimalUtils;
import com.kehutong.common.util.ConvertUtils;

import java.math.BigDecimal;

/**
 * @program: kht
 * @description: MeterReadStatist导出实体
 * @author: jian Ye
 * @create: 2021/8/9
 **/
@ColumnWidth(15)
public class MeterReadStatistExcelVO {

    @ColumnWidth(30)
    @ExcelProperty(value ="仪表地址")
    private String meterAddress;
    @ExcelProperty(value = "仪表编号")
    private String meterNo;
    @ExcelProperty(value ="仪表分类")
    private String meterClassifyName;
    @ExcelProperty(value ="当前读数")
    private String timeNumber;
    @ExcelProperty(value ="本月用量")
    private String timeUseNumber;
    @ExcelProperty(value ="读数开始时间")
    private String startTime;
    @ExcelProperty(value ="读数结束时间")
    private String endTime;
    @ExcelProperty(value ="抄表年月")
    private String readYearMonth;
    @ExcelProperty(value ="抄表状态")
    private String readStatus;
    @ExcelProperty(value ="计费状态")
    private String feeStatus;


    public String getMeterNo() {
        return meterNo;
    }

    public void setMeterNo(String meterNo) {
        this.meterNo = meterNo;
    }

    public String getMeterClassifyName() {
        return meterClassifyName;
    }

    public void setMeterClassifyName(String meterClassifyName) {
        this.meterClassifyName = meterClassifyName;
    }

    public String getMeterAddress() {
        return meterAddress;
    }

    public void setMeterAddress(String meterAddress) {
        this.meterAddress = meterAddress;
    }

    //特殊处理
    public String getTimeNumber() {
        return BigDecimalUtils.parse(timeNumber);
    }

    public void setTimeNumber(String timeNumber) {
        this.timeNumber = timeNumber;
    }

    //特殊处理
    public String getTimeUseNumber() {
        return BigDecimalUtils.parse(timeUseNumber);
    }

    public void setTimeUseNumber(String timeUseNumber) {
        this.timeUseNumber = timeUseNumber;
    }

    //特殊处理
    public String getStartTime() {
        return ConvertUtils.toNoNullString(startTime);
    }

    public void setStartTime(String startTime) {
        this.startTime = startTime;
    }

    //特殊处理
    public String getEndTime() {
        return ConvertUtils.toNoNullString(endTime);
    }

    public void setEndTime(String endTime) {
        this.endTime = endTime;
    }

    public String getReadYearMonth() {
        return readYearMonth;
    }

    public void setReadYearMonth(String readYearMonth) {
        this.readYearMonth = readYearMonth;
    }

    //特殊处理
    public String getReadStatus() {
        return readStatus.equals("1")?"未抄表":(readStatus.equals("2")?"已抄表":"--");
    }

    public void setReadStatus(String readStatus) {
        this.readStatus = readStatus;
    }

    //特殊处理
    public String getFeeStatus() {
        return feeStatus.equals("1")?"未抄表":(feeStatus.equals("2")?"待计费":(feeStatus.equals("3")?"已计费":"--"));
    }

    public void setFeeStatus(String feeStatus) {
        this.feeStatus = feeStatus;
    }
}
